<?php defined('IN_IA') or exit('Access Denied');?><div id="search" class="navbar navbar-inverse">
    <ul class="nav">

        <li>
            <a href="javascript:location.reload();" id="dLabel" type="button">
                <i class="fa fa-refresh"></i>
                <span class="text">刷新页面</span>
            </a>
        </li>
        
        <li>
            <a href="<?php  echo aurl('index', 'feedback')?>" type="button">
                <i class="fa fa-envelope"></i>
                <span class="text">意见反馈</span>
            </a>
        </li>

        <?php  if(IS_DEV === true) { ?>
        <li class="dropdown">
            <a href="javascript:;" id="dLabel" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                <i class="fa fa-wrench"></i>
                <span class="text">开发者工具</span>
                <span class="caret"></span>
            </a>
            <ul class="dropdown-menu pull-right" aria-labelledby="dLabel">
                <li><a href="<?php  echo aurl('output_sql', 'dev')?>" class="ajax-post confirm"><i class="fa fa-database"></i> 数据表结构导出</a></li>
                <li><a href="<?php  echo aurl('repairSql', 'dev')?>" class="ajax-post confirm" data-confirm="确定将数据库修复到当前版本（V<?php echo MVERSION;?>）？\n\n修复的部分不包括系统内容"><i class="fa fa-database"></i> 模块数据库修复</a></li>
            </ul>
        </li>
        <?php  } ?>

        <?php  $accounts_list = get_accounts_list()?>
        <li class="dropdown" id="profile-wechat"><a href="javascript:;"
            data-toggle="dropdown" data-target="#profile-wechat" class="dropdown-toggle"><i class="fa fa-wechat"></i> <?php  echo $_W['account']['name'];?></span><b class="caret"></b></a>
            <?php  if(!empty($accounts_list)) { ?>
            <ul class="dropdown-menu pull-right module-related-info">
                    <?php  if(is_array($accounts_list)) { foreach($accounts_list as $account) { ?>
                    <li>
                        <a href="<?php  echo $account['url']?>">
                            <?php  if(!empty($account['app_name'])) { ?><i class="wi wi-wechat"></i><span><?php  echo $account['app_name'];?></span><?php  } ?>
                            <?php  if(!empty($account['app_name']) && !empty($account['wxapp_name'])) { ?>
                            <i class="wi wi-plus"></i><span class="plus"></span>
                            <?php  } ?>
                            <?php  if(!empty($account['wxapp_name'])) { ?><i class="wi wi-wxapp"></i><span><?php  echo $account['wxapp_name'];?></span><?php  } ?>
                        </a>
                    </li>
                    <?php  } } ?>
            </ul>
            <?php  } ?>
        </li>
        
        <?php  $frames_system = buildframes('system')?>
        <?php  if(empty($frames_system['section']['message']['is_display']) && $frames_system['section']['message']['is_display'] != '0') { ?>
        <li class="dropdown msg header-notice">
            <a href="javascript:;"><i class="fa fa-bell"></i>
                <span class="text">消息<span class="badge"></span></span></a>
            <div class="dropdown-menu">
                <div class="clearfix top">消息<a href="./index.php?c=message&a=notice" class="pull-right">查看更多</a></div>
            </div>
        </li>
        <?php  } ?>

        
        <!-- <li class=""><a title="" href="<?php  echo url('module/display');?>"><i class="fa fa-sign-in-alt"></i>
                <span class="text">返回微擎</span></a></li> -->

        <?php  if(!empty($nav_top_help)) { ?>
        <li>
            <a title="" href="<?php  if(empty($nav_top_help['url'])) { ?><?php  echo url('home/welcome/' . $nav_top_help['name']);?><?php  } else { ?><?php  echo $nav_top_help['url'];?><?php  } ?>"
                target="_blank"><i class="fa fa-question-circle"></i>
                <span class="text">帮助</span></a>
        </li>
        <?php  } ?>

        <li class="dropdown" id="profile-messages"><a href="javascript:;"
                data-toggle="dropdown" data-target="#profile-messages" class="dropdown-toggle"><i class="fa fa-user"></i>
                <span class="text"><?php  echo $_W['user']['username'];?></span><b class="caret"></b></a>
            <ul class="dropdown-menu pull-right">
                <li><a href="<?php  echo url('user/profile');?>"><i class="fa fa-user"></i>
                    我的账号</a></li>
                <li class="divider"></li>
                <?php  if(permission_check_account_user('see_system_upgrade')) { ?>
                <li><a href="<?php  echo url('cloud/upgrade');?>" target="_blank"><i class="fa fa-check"></i>
                    自动更新</a></li>
                <?php  } ?>
                <?php  if(permission_check_account_user('see_system_updatecache')) { ?>
                <li><a href="<?php  echo url('system/updatecache');?>" class="ajax-post confirm" data-confirm="确认更新缓存吗？" data-submit="submit"><i class="fa fa-key"></i>
                    更新缓存</a></li>
                <?php  } ?>
                <li class="divider"></li>
                <?php  if(is_array($nav_top_tiled_other)) { foreach($nav_top_tiled_other as $nav) { ?>
                <li><a title="<?php  echo $nav['title'];?>" href="<?php  if(empty($nav['url'])) { ?><?php  echo url('home/welcome/' . $nav['name']);?><?php  } else { ?><?php  echo $nav['url'];?><?php  } ?>"
                        target="_blank"><i class="fa fa-cog"></i>
                        <span class="text"><?php  echo $nav['title'];?></span></a></li>
                <?php  } } ?>
                <li class="divider"></li>

                <?php  $frames_site = buildframes('site')?>
                <?php  $workorder_nav=$frames_site['section']['workorder']['menu']['system_workorder']?>
                <?php  if($workorder_nav['is_display']) { ?>
                    <?php  if(permission_check_account_user('see_workorder')) { ?>
                    <li>
                        <a title="工单" href="<?php  echo url('system/workorder/display')?>"
                            target="_blank"><i class="fa fa-file-word"></i>
                            <span class="text">工单</span></a>
                    </li>
                    <li class="divider"></li>
                    <?php  } ?>
                <?php  } ?>
                
                <li><a href="<?php  echo url('user/logout');?>"><i class="fa fa-sign-in"></i>
                    退出系统</a></li>
                
            </ul>
        </li>

        
    </ul>
</div>